1. Field of the Invention
The present invention relates to a data processor, and more in particular it relates to a data processor capable of reducing the time required for task switching by saving and returning contents of registers to and from a memory for task switching at high speed.
2. Description of Related Art
With recent higher operation speed of the data processor, there has been required higher operation speed of a main memory, as a result, there occurs a problem that a cost price is increasing to realize the system of such a memory. As one method for solving such a problem, there is employed an art to provide a cache memory, which is a high-speed memory, between the data processor and the main memory in order to fill up the difference of the operation speed between the data processor and the main memory.
In addition to the above art, there is disclosed in detail in Japanese Patent Application Laid-Open No. 63-193230 (1988), for example that the high-speed cache memory is realized by providing it in the same integrated circuit of the data processor.
However, even when only the average time required for memory access is reduced by providing the cache memory, in the case where there is carried out task switching or the like which is specifically requested to operate at high-speed, there is possibility that a cache miss should be occurred, which resulting in no possibility to reduce the maximum value of the time required for task switching operation.
In order to solve such a problem, there is proposed such arrangement as that a context saving memory for task switching operation is defined in addition to a normal memory space, and the memory to be used as context saving memory space is constructed to be a high-speed memory or the context saving memory is realized in the same integrated circuit of the data processor, and then, the time required for task switching can be reduced. Such art as described above are disclosed in the Japanese Patent Application Laid-Open No. 64-91253 (1989), for example.
Even when the high-speed memory is provided as the cache memory, in the case where a cache miss should be occurs, it is not possible to realize high-speed memory access. And even when there is defined, in addition to the normal memory apace, another memory space for context saving, unless this memory which constructs the memory space for context saving is capable of being operated at higher speed than other memories, the time required for task switching can not be reduced.
Such a problem occurs because a content of only one register can be transferred by one operation at saving the content of a register in the memory or at restoring it by the context switching instruction.
Especially, in the construction in which the cache memory and the data processor are built in the same integrated circuit, data transfer path between the cache memory and the register file can be provided by low cost, so that it is easy to increase capacity of data transferring by widening bit width of the path.